type Reverse<T> = T extends [infer R, ...infer P]
    ? [...Reverse<P>, R]
    : T